<HTML><HEAD><TITLE>msg(?X, ?Y, -MSG)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(sd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>msg(?X, ?Y, -MSG)</H1>
MSG is the most specific generalisation of X and Y representable with domain variables from this library
<DL>
<DT><EM>X</EM></DT>
<DD>Any term or variable
</DD>
<DT><EM>Y</EM></DT>
<DD>Any term or variable
</DD>
<DT><EM>MSG</EM></DT>
<DD>A domain variable or constant (output)
</DD>
</DL>
<H2>Description</H2>
<P>
	This predicate computes the most specific generalisation of X and Y
	which can be represented using this library's domain variables.
	</P><P>
	If X and Y are domain variables (or atomic constants), then MSG
	will be unified with a new domain variable whose domain
	consists of the union of the domain elements of X and Y.
	If the domain union contains only a single value, the result
	is this single value.
	</P><P>
	If X or Y are free (unconstrained) variables, then the result will
	also be a free (unconstrained) variable.
    </P>
<H3>Fail Conditions</H3>
None
<H2>Examples</H2>
<PRE>
    ?- msg(we, fr, Z).
    Z = Z{[we, fr]}
    Yes (0.00s cpu)

    ?- X &amp;:: [sa, su], msg(X, we, Z).
    X = X{[sa, su]}
    Z = Z{[we, sa, su]}
    Yes (0.00s cpu)

    ?- X &amp;:: [sa, su], Y &amp;:: [mo, tu, we], msg(X, Y, Z).
    X = X{[sa, su]}
    Y = Y{[mo, tu, we]}
    Z = Z{[mo, tu, we, sa, su]}
    Yes (0.00s cpu)

    ?- X &amp;:: [sa, su], msg(X, _, Z).
    X = X{[sa, su]}
    Z = Z
    Yes (0.01s cpu)

    ?- msg(we, we, X).
    X = we
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/ic_symbolic/msg-3.html">ic_symbolic : msg / 3</A>, <A HREF="../../lib/fd/index.html">fd : msg / 3</A>, <A HREF="../../lib/ic_kernel/msg-3.html">ic_kernel : msg / 3</A>, <A HREF="../../lib/propia/index.html">library(propia)</A>, <A HREF="../../lib/sd/YNN-2.html">&:: / 2</A>
</BODY></HTML>
